# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: team/phosh <newbyte@postmarketos.org>
pkgname=feedbackd
pkgver=0.5.0
pkgrel=0
pkgdesc="Daemon to provide haptic, LED, and audio feedback triggered by application events"
url="https://source.puri.sm/Librem5/feedbackd"
arch="all"
license="GPL-3.0-or-later"
depends="dbus feedbackd-device-themes"
makedepends="
	gi-docgen
	glib-dev
	gmobile-dev
	gobject-introspection-dev
	gsound-dev
	gtk-doc
	json-glib-dev
	libgudev-dev
	meson
	vala
	umockdev-dev
	"
subpackages="$pkgname-dev $pkgname-doc"
source="https://sources.phosh.mobi/releases/feedbackd/feedbackd-$pkgver.tar.xz"
install="$pkgname.pre-install $pkgname.pre-upgrade"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dgtk_doc=true \
		-Dudev=true \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
a6163b2e777a0e7ca3f8fa4b2c43d9dec3f9d0b6c7dab7031b7105686b5d100c0ec68f80ea9e98f2376452a868421d5e2a3a238d3e0721ca5f3b04882b7a5232  feedbackd-0.5.0.tar.xz
"
